<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="https://cdn.bootcss.com/element-ui/2.13.0/theme-chalk/index.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/web/web.css">
    <title>JmeterWeb</title>
</head>
<body>

<div id="app">
    <el-row>

        <el-col :span="12">
            <template>
                <div class="block">
                    <el-upload
                            class="upload-demo"
                            drag
                            action="/api/upload"
                            :on-preview="handlePreview"
                            :on-remove="handleRemove"
                            :on-success="handleSuccess"
                            :on-change="handleChange"
                            :file-list="fileList"
                            :auto-upload="true"
                            multiple>
                        <i class="el-icon-upload"></i>
                        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                        <div class="el-upload__tip" slot="tip">只能上传jmx文件</div>
                    </el-upload>
                </div>
            </template>
        </el-col>

        <el-col :span="12">
            <template>
                <div style="color:red">
                    <div>提示：</div><span><a href="http://jmeterreport.k8s.tbocii.tk:8000/root/web/" target="_blank">jmeter 文件目录</a></span>
                    <div v-html="msg"></div>

                </div>
            </template>
        </el-col>


    </el-row>
     <el-divider></el-divider>
    <el-row>
            <template>
                <div style="color:black">

                    <el-button type="primary" @click="fetchCu">加载运行输出</el-button>
                    <el-button type="primary" @click="goReport">访问报告</el-button>
                    <!--<el-link type="primary" i target="_blank">访问报告</el-link>-->
                    <el-button type="error" @click="handleKill">结束当前测试</el-button>
                    <a href="/web/test_baidu.jmx" target="_blank">下载样例jmx</a>
                    <div>输出：</div>
                    <div v-html="output"></div>

                </div>
            </template>
        </el-row>
</div>
</body>


<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
<script src="https://cdn.bootcss.com/element-ui/2.12.0/index.js"></script>
<script src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.min.js"></script>
<script src="/web/web.js"></script>
</html>